<template>
  <div class="col" id="left-menu">
    <i v-on:click="toggleOrg" class="fa fa-building-o fa-2x" title="Organizations"></i>
  </div>
</template>
<script>
  import {ipcRenderer} from 'electron';

  export default {
    name: 'leftMenu',
    mounted: function () {
      $('#leftMenuExpanded').hide();
    },
    methods: {
      toggleOrg() {
        $('#leftMenuExpanded').toggle();
        // $('link#theme').attr('href', 'static/style2.css');
        if ($('#leftMenuExpanded').is(':visible')) {
          $('#mainView').css('padding-left', '245px');
          $('#mainView #tabs').css('width', '80vw');
        } else {
          $('#mainView').css('padding-left', '45px');
          $('#mainView #tabs').css('width', '95vw');
        }
        ipcRenderer.send('orgMenuToggle');
      }
    }
  };
</script>

<style>
  @import '../assets/css/leftmenu.css';
</style>
